// 创建一个枚举
enum Weeks{
  One,
  Two = 5,
  Three,
  Four
}
console.log(Weeks.One)
console.log(Weeks['One'])
console.log(Weeks.Three)

enum Weeks2{
  One,
  Two,
  Three = '1',
  Four = '2'
}
console.log(Weeks2.Two)
console.log(typeof Weeks2.Three)
console.log(Weeks2[5]) // undefined

// 常数枚举(不被编译)
const enum Info{
  name = 'hugo',
  age = 22
}
console.log(Info.name)
console.log(Info.age)